<?php

namespace app\model\course\course;

use app\model\company\Company;
use app\model\TimeModel;
use app\model\type\SystemType;
use think\model\Relation;

class Course extends TimeModel
{
    protected $table = 'sj_course';
    protected $json = ['ware_json'];
    protected $jsonAssoc = true;

    public function merchantType(): Relation
    {
        return $this->belongsTo(SystemType::class, 'merchant_type_id', 'id');
    }

    public function company(): Relation
    {
        return $this->belongsTo(Company::class, 'company_id', 'id');
    }
}